import request from '@/util/http.js'

const API = `/basic/product`

export function saveProduct(obj){
    return request({
        method: 'post',
        url: `${API}/save`,
        data: obj
    })
}

export function getProductAll(pageNum,pageSize,obj){
    return request({
        method: 'get',
        url: `${API}/get/${pageNum}/${pageSize}`,
        params: obj
    })
}

export function deleteProductById(id) {
    return request({
        method: 'delete',
        url: `${API}/${id}`,
    })
}

export function updateProduct(obj){
    return request({
        method: 'put',
        url: `${API}`,
        data: obj
    })
}